<template>
  <div id="wrapper">
    <webview id="page" :src="src"></webview>
  </div>
</template>

<script>
const {shell} = require('electron');


export default {
  name: "landing-page",
  data() {
    return {
      src: "",
      content: false,
    };
  },
  mounted() {
    let src = this.$db.read().get("baseData").value().adminAddress;
    if (src) {
      this.src = src;
    }
  },
  methods: {
    open(link) {
      shell.openExternal(link);
    },
    contentDB() {
      let src = this.$db.set("baseData", { adminAddress:this.srcinput }).write();
      this.src = this.srcinput;
      this.content = true;
    },
  },
};
</script>

<style>
#page{
  position: absolute;
  left: 63px;
  top: 28px;
  height: calc(100vh - 28px);
  width: calc(100vw - 63px);
}

@import url("https://fonts.googleapis.com/css?family=Source+Sans+Pro");

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
}

*::-webkit-scrollbar {
  width: 0 !important;
}

* {
  -ms-overflow-style: none;
}

* {
  overflow: -moz-scrollbars-none;
}

body {
  font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
}

#wrapper {
  background: radial-gradient(ellipse at top left, rgba(255, 255, 255, 1) 40%);
  /* margin-left: 20vh; */
  padding: 30px 80px;
}

#logo {
  height: auto;
  width: 320px;
}

main {
  display: flex;
  justify-content: space-between;
}

main > div {
  flex-basis: 50%;
}

.left-side {
  display: flex;
  flex-direction: column;
}

.right-side {
  background-color: #eeeeee;
  position: fixed;
  width: 180px;
  top: 28px;
  right: 0px;
  height: calc(100vh - 28px);
  border-left: solid 1px #e6e6e6;
}

.welcome {
  color: #555;
  font-size: 23px;
  margin-bottom: 10px;
}

.title {
  color: #2c3e50;
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 6px;
}

.title.alt {
  font-size: 18px;
  margin-bottom: 10px;
}

.doc p {
  color: black;
  margin-bottom: 10px;
}

.doc button {
  font-size: 0.8em;
  cursor: pointer;
  outline: none;
  padding: 0.75em 2em;
  border-radius: 2em;
  display: inline-block;
  color: #fff;
  background-color: #4fc08d;
  transition: all 0.15s ease;
  box-sizing: border-box;
  border: 1px solid #4fc08d;
}

.doc button.alt {
  color: #42b983;
  background-color: transparent;
}
</style>
